Returns the value of an environment variable as a string. Environment variables are dependent on the type of operating system that you have.
環境変数の値を取得して、文字列として返します。どのような環境変数が存在するかは、使用するオペレーティングシステムに依存します。
Environ (Environment As String)
Environ (Environment As String)
String
文字列
Environment: Environment variable that you want to return the value for.
Environment:値を取得する環境変数。
Sub ExampleEnviron
Sub ExampleEnviron
Dim sTemp As String
Dim sTemp As String
sTemp=Environ ("TEMP")
sTemp=Environ ("TEMP")
If sTemp = "" Then sTemp=Environ("TMP")
If sTemp = "" Then sTemp=Environ("TMP")
MsgBox "'" & sTemp & "'" ,64,"Directory of temporary files:"
MsgBox "'" & sTemp & "'" ,64,"Directory of temporary files:"
End Sub
End Sub